package com.qingke.servlets;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

@WebListener
public class SessionListener implements HttpSessionListener, HttpSessionAttributeListener, HttpSessionActivationListener {

    public SessionListener() {
    }

    public void sessionCreated(HttpSessionEvent arg0)  { 
    	System.out.println("***session created***");
    }

    public void sessionDestroyed(HttpSessionEvent arg0)  { 
    	System.out.println("***session destroyed***");
    }

    public void sessionDidActivate(HttpSessionEvent arg0)  { 
    	System.out.println("***session did activate***");
    }
    
    public void attributeAdded(HttpSessionBindingEvent arg0)  { 
    	System.out.println("***attribute added***");
    }

    public void attributeRemoved(HttpSessionBindingEvent arg0)  { 
    	System.out.println("***attribute removed***");
    }

    public void attributeReplaced(HttpSessionBindingEvent arg0)  { 
    	System.out.println("***attribute replaced***");
    }

    public void sessionWillPassivate(HttpSessionEvent arg0)  { 
    	System.out.println("***session will passivate***");
    }
	
}
